'''
sort 是就地排序，返回None，不产生新的列表，会改变本身的排序
sorted 是产生新列表，并可以对所有序列排序，包括元组
'''
fruits = ['grape', 'raspberry', 'apple', 'banana']
print(fruits)
fruitsSorted = sorted(fruits)
print(fruitsSorted)
print()

ReverseSorted = sorted(fruits, reverse=True)
print(ReverseSorted)
print()

LenSorted = sorted(fruits, key=len)
print(LenSorted)
print()

ReverseLenSorted = sorted(fruits, key=len, reverse=True)
print(ReverseLenSorted)
print()

print(fruits)
sortFruits = fruits.sort()
print(sortFruits)
print(fruits)

if __name__ == '__main__':
    print('done')
